<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>借阅信息管理</title>
    <link rel="stylesheet" href="/css/bootstrap.min.css" type="text/css"/>
    <link rel="stylesheet" href="/css/bootstrap-theme.min.css" type="text/css"/>
    <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
    <script src="/js/bootstrap.min.js" type="application/javascript"></script>
</head>
<body style="text-align: center">
<div th:insert="~{navigation :: nav}"></div>
<a href="/admin_book"><button type="button" class="btn btn-primary btn-lg">图书信息管理</button></a>
<a href="/admin_record"><button type="button" class="btn btn-primary btn-lg">借阅信息管理</button></a>
<h1><b>借阅信息管理</b></h1>

<div>
    <table class="table table-striped" style="width: 100%">
        <tr>
            <th style="width: 25%">电话号码</th>
            <th style="width: 25%">图书ID</th>
            <th style="width: 25%">借阅时间</th>
            <th style="width: 25%">修改</th>
        </tr>
        <tr th:each="record:${records}">
            <th th:text="${record.phone}"></th>
            <th th:text="${record.id}"></th>
            <th th:text="${#dates.format(record.gmtCreated,'yyyy-MM-dd')}"></th>
            <th>
                <form action="/delete_record">
                    <input type="hidden" name="rphone" th:value="${record.phone}">
                    <input type="hidden" name="rtime" th:value="${record.gmtCreated}">
                    <button style="width: 50%;float: left;" type="submit" class="btn btn-danger" role="button">删除</button>
                </form>
            </th>
            <th>
            </th>
        </tr>
    </table>
</div>
</body>
</html>